﻿Imports log4net

Partial Class MasterPage
    Inherits System.Web.UI.MasterPage

    Dim log As ILog = LogManager.GetLogger("LogFile")

    Public Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
        log.Debug("Iniciando la pagina Maestra")

        If Not IsPostBack Then
            Me.LoadJavaScript()
        End If

        Dim objUtilidades As Utilidades = New Utilidades()
        Dim currentPage As String = Page.Request.AppRelativeCurrentExecutionFilePath
        'If Not currentPage.Equals("~/FatalError.aspx") Then
        'objUtilidades.CheckVersion()
        'End If


        log.Debug("Finalizando la pagina Maestra")
    End Sub

    Protected Sub LoadJavaScript()

        Dim strJavascript As New StringBuilder()

        Dim applicationPath As String = VirtualPathUtility.ToAbsolute("~/")

        strJavascript.Append("<script type'text/javascript' src='" & applicationPath & "Scripts/jquery-1.6.2.min.js")
        strJavascript.Append("'></script>")

        strJavascript.Append("<script type'text/javascript' src='" & applicationPath & "Scripts/jquery-ui-1.8.16.custom.min.js")
        strJavascript.Append("'></script>")

        strJavascript.Append("<script type'text/javascript' src='" & applicationPath & "Scripts/menu.js")
        strJavascript.Append("'></script>")

        strJavascript.Append("<script type'text/javascript' src='" & applicationPath & "Scripts/common.js")
        strJavascript.Append("'></script>")

        JavaScriptLiteral.Text = strJavascript.ToString()

    End Sub


End Class

